These are some trivial questions, but I can't seem to get them answered
anywhere else:
1: When I compile an Obj-C program using gcc (Version 2.3.2) and -Wall, I
get the following warning occuring N times, where N is (apparently) the number
of methods I have in the class:
List.m:299: warning: aggregate has a partly bracketed initializer
Where line 299 is the line AFTER the last line in the file. What does this
error mean?
2: Is there anyway to get gcc to give me the intermediate C code that is
produced from the Objective-C code that I write? i.e. I'd like to be able
to write stuff in Objective-C, but give the programs to people who only have
a C compiler.
3: Why does gcc not like "#import" statements? It seems that
using "#include" with the #ifndef _File_INCLUDE_ statements is kind of a
ugly way to do this.
---
Adam Fedor. CU, Boulder | Fudd's Law of Opposition: Push something
fedor@boulder.colorado.edu (W) | hard enough and it will fall over.
adam@bastille.rmnug.org (H,NeXTMail)|
To: Adam Fedor <fedor@focus.colorado.edu>
Cc: gnu-objc@prep.ai.mit.edu
Subject: Re: questions...
In-Reply-To: (Your message of Tue, 05 Jan 93 16:19:59 MST.)
<9301052319.AA27146@focus.colorado.edu>
Date: Tue, 05 Jan 93 18:16:18 -0600
From: Chris Petrilli <petrilli@gnu.ai.mit.edu>
>>>>> On Tue, 5 Jan 93 16:19:59 -0700, Adam Fedor
>>>>> <fedor@focus.colorado.edu> said:
Adam> 2: Is there anyway to get gcc to give me the intermediate C code
Adam> that is produced from the Objective-C code that I write? i.e.
Adam> I'd like to be able to write stuff in Objective-C, but give the
Adam> programs to people who only have a C compiler.
Bzzz... thank you for playing :-) GCC doesn't generate anything like C
from Objective-C, but instead generates a "generic" pseudocode (RTL I
believe it's called). This is portable between GCCs on different
platforms, but not to other compilers. You could theoretically run
the second pass manually I guess to convert this to object code. But
Objective-C is not translated a'la C-front code for C++.
Chris
Date: Wed, 6 Jan 93 21:55:51 -0700
From: jsoft!ggf@uunet.uu.net (Gary Frederick)
To: gnu-objc@prep.ai.mit.edu
Subject: Re: questions... (summary)
Reply-To: ggf@jsoft.com
Adam Fedor asked:
> 2: Is there anyway to get gcc to give me the intermediate C code that is
> produced from the Objective-C code that I write?
I was able to get enough info out of the .s file to write C that worked like Objective C. It helped clarify the documentation on the NeXT Objective C funtions.